<app-tip [type]="tipType"></app-tip>
<div>
  <app-header></app-header>
</div>
<div class="container">
  <div class="main">
    <div class="num">{{statistics.balance | price }}</div>
    <div class="num-desc">总资产（元）</div>
    <div class="withdraw-cash-desc" [routerLink]="['/main/withdraw-cash']">收益满一百可提现 <i class="fa fa-chevron-right"></i></div>
  </div>

  <div class="profit">
    <div class="con flex">
      <div class="grid" style="border-right: 1px solid #fff">
        <div class="grid-text">总营业额</div>
        <div>{{statistics.totalTurnover | price}}元</div>
      </div>
      <div class="grid" style="border-right: 1px solid #fff">
        <div class="grid-text">昨日收益</div>
        <div>{{statistics.yesterdayIncome | price}}元</div>
      </div>
      <div class="grid" [routerLink]="['/main/merchant/cumulative-income']">
        <div class="grid-text">累计收益</div>
        <div>{{statistics.totalIncome | price}}元</div>
      </div>
    </div>
  </div>

  <div class="tip" *ngIf="turnoverRecord.shop_name">
    <div class="text flex" [routerLink]="['/main/merchant/real-income']">
      <div class="left"><i class="far fa-comment-alt" style="color: rgba(0, 0, 0, 0.7)"></i></div>
      <div class="right" [ngClass]="{'fan-gun': gunDong}">
        <div style="line-height: 2em;color: rgba(0, 0, 0, 0.7)">店铺名称：{{turnoverRecord.shop_name}}<span style="color: #666;margin-left: 1em;"><i class="fa fa-clock"></i> {{turnoverRecord.create_time}}</span></div>
        <div> <span style="color: #e75033">消费金额：{{turnoverRecord.money}} 元</span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #329d38;">预计收益：{{turnoverRecord.expectedEarnings}} 元</span></div>
      </div>
    </div>
  </div>
  <div class="tip" *ngIf="!turnoverRecord.shop_name">
    <div class="text" [routerLink]="['/main/merchant/real-income']"><i class="far fa-comment-alt"></i> 您今天还没有开张</div>
  </div>

  <div class="today">
    <div class="title">今日收益</div>
    <div class="today-profit flex">
      <div class="grid"  [routerLink]="['/main/merchant/today-earnings-list']">
        <div class="grid-text">营业额消费</div>
        <div>{{dayData.turnoverConsumption | price}}元</div>
      </div>
      <div class="grid"  [routerLink]="['/main/merchant/today-earnings-list']">
        <div class="grid-text">预计收益</div>
        <div>{{dayData.profit | price}}元</div>
      </div>
      <div class="grid"  [routerLink]="['/main/merchant/today-earnings-list']">
        <div class="grid-text">预计到帐时间</div>
        <div>明日0点到帐</div>
      </div>
    </div>
  </div>

  <div class="today">
    <div class="title">最近收益</div>
    <div class="today-profit flex">
      <div id="echarts" style="width: 100%;height: 200px;margin-left: 5px;"></div>
      <!--<div *ngIf="!lineData.time.length" style="text-align: center;padding-top: 20%;color: #999;width: 100%">-->
          <!--<p>-->
            <!--<i class="fa fa-info-circle fa-3x" aria-hidden="true" style="color: #ddd"></i>-->
          <!--</p>-->
          <!--<p>-->
            <!--暂时没有数据信息...-->
          <!--</p>-->
      <!--</div>-->
    </div>
  </div>

  <div class="today">
    <div class="title">收益规则</div>
    <div class="today-profit flex" style="padding: 2em">
      每日的收益金额于第二日凌晨零点到帐
    </div>
  </div>

  <div class="btn" style="padding: 0 2em;margin-top: 1em;margin-bottom: 1em;" [routerLink]="['/main/withdraw-cash']">
    <div class="btn-submit">全部提现</div>
  </div>
</div>
